home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 8
/
The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO
/
prg_gen
/
cobfd.zip
/
COBFD.DOC
< prev
next >
Wrap
Text File
|
1996-12-01
|
7KB
|
153 lines
Tal Systems' COBOL FD Analyzer - COBFD
Version 1.21 December 1996
by Michael Mattias dba Tal Systems
COBFD is a tool for COBOL programmers. Very simply, what it does is parse
a COBOL source file (either a copylib or complete source), identifies all
group and elementary data items, then breaks down all '01' and subordinate
group items into their components and produces a report file showing the
size in bytes and the offset within the '01' record of every subordinate
data item. All group and elementary data items are included. The user has
an option to include the input file in the report output (follows analysis).
COBFD supports all levels of REDEFINES and OCCURS: REDEFINES which OCCUR,
OCCURS which OCCUR while REDEFINE'ing an item which OCCURS; OCCUR'ing
group items with mixed data types. These are typically the greatest
challenges to counting bytes "by hand".
COBFD runs on MS-DOS and compatible PC's and requires DOS 2.0 or higher.
It will run in a DOS session under Windows(r); but has not been tested
on Windows 95 or Windows NT. It is a single user program; there is no
provision for sharing files, but the program has been run on a network.
The program creates and deletes an internal workfile, COBFD@@.WRK, in
the user's current directory.
Both the input and output files are user-specified at run time. The output
file is 80 bytes per record, formatted, with page headers (all text).
The user must provide a file viewer/printer for screen or printed output.
COBFD is not intended as a general-user-community product. It is provided
for COBOL programmers who have a need for detailed offset information about
datanames. Typical uses include writing reports in SyncSort, checking data
during conversions and adding new REDEFINES datanames into existing software.
It is also intended as advertising for the author.
To use the COBFD program:
COBFD <Enter>
You will be given a screen with boxes for input file and output file.
(The mouse is not enabled on this screen).
For the input file, the user may simply type the name of the input file.
Drive and/or path may be included in the filename. Pressing ALT+D will
bring up a pickbox of files; while in the pickbox, the user may "navigate"
directories by pressing <Enter> or clicking the mouse on a highlighted
directory entry. The user's "current" directory is unaffected.
The user must type the name of the output file; drive and/or path are optional.
Processing is initiated by pressing F10. Progress messages are displayed
(but they generally go by so quickly that they are of little use).
After a source file is processed, the user will be asked if he wants to
do another file; if yes, the input and output files must be reentered.
The output file is always opened "new" and will erase any previous file
with that name. The presence of an existing file with the same name as
the user output file is NOT CHECKED.
What Tal Systems' COBFD COBOL FD Analyzer assumes:
A valid COBOL FD. If PICTURE clauses are missing or illegal, sentences are
not terminated with a period, or levels are inconsistent, the program
will return unreliable data, generally without a warning.
If column seven (7) of the input file is non-blank, the line is a comment.
All PICTURE, OCCURS, REDEFINES, USAGE DISPLAY|COMP|SIGN SEPARATE and other
COBOL keywords appear in columns 13-72 . These clauses may, however, span
multiple physical lines with comment lines interspersed. The order in which
keywords appear is immaterial. A COBOL sentence is not terminated until
a non-quoted period is found.
The QUOTE character is the first double-quote (") or apostrophe (') found
in a non-comment input record. The QUOTE character is redefined for each
file processed during a program run; i.e., the user can process multiple
files, some using quote and others using apostrophe as the literal delimiter.
A REDEFINES clause below the '01' level assumes that the area being
redefined is the same size as the redefined area. (Not an ANSI COBOL
requirement). If this is not true, the program will appear to finish
normally, but the data may be erroneous. REDEFINES is ignored at the
'01' dataname level.
When parsing the input file, if the first two words in a non-comment line
are PROCEDURE and DIVISION, the program stops looking for data; however,
if printing the input file, it prints the entire file.
RENAMES ('66-level') clauses are not supported
SYNC clauses are not supported.
PICTURE clauses containing "P" (scaled numeric) are not supported.
POINTER and PROCEDURE POINTER data items are not supported
USAGE BINARY is considered USAGE COMPUTATIONAL.
Only EJECT, SKIP1, SKIP2, COPY and ++INCLUDE are recognized as
compiler directives (treated as comments). Other directives may
cause the program to insert an extra SYSTEM-GENERATED-01-DATANAME
in the output following the directive. The offset information should
not be affected unless the unsupported directive is contained within
the physical boundaries of an explicit or implicit '01' dataname.
No form of COPY is supported; but copylibs themselves may be analyzed.
If an '01' record is not found as the first COBOL data item, the system
creates one with the name SYSTEM-GENERATED-01-DATANAME. This allows the
program to be used with copylibs not containing an '01 -level' dataname.
A FEW EXTRA NOTES:
The mouse is enabled in the file pickoff box, but not in the input screen.
The file COBELEM.COB is included. This is an FD containing most of the possible
elementary numeric data types. In as much as the author does not have
access to all types of operating systems and/or COBOL compilers, he provided
this so that the user can see what the size of elementary items are. Should
some system(s) require additional numeric data types, notify the author
and they will be considered for a future release.
COBFD is a copyright product. It may be freely used and distributed without
payment or registration. However, it may not be distributed for monetary
consideration, either standalone or "bundled" with other utilities,
applications or instructional material without the permission of the
copyright owner.
Distribution to individual programmers is encouraged.
Copyright Michael C. Mattias dba Tal Systems, Sturtevant WI USA.
v 1.0 August 1996.
v 1.1 September 1996.
v 1.2 November 1996 (released).
v 1.21 December 1996 Fixed bug: bad offset when dataname level drops
directly from, say, '07' to '03' and a dataname at an intervening
level (e.g.,'05') since the last '03' had an OCCURS clause.
The author would appreciate any comments, remarks, bug reports, or
desired enhancements be submitted to:
Michael C. Mattias dba Tal Systems
2950 87th St.
Sturtevant, WI 53177-2044 USA
414-884-9748
Compuserve ID 72030,3563
Internet 72030.3563@compuserve.com